home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9038 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.5 KB  |  40 lines

  1. Path: holly.ACNS.ColoState.EDU!not-for-mail
  2. From: corbyh@holly.ACNS.ColoState.EDU (Corby S. Hudnall)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Anyone Using g++ With C++ Templates?
  5. Date: 27 Feb 1996 21:27:19 -0700
  6. Organization: Colorado State University, Fort Collins, CO  80523
  7. Message-ID: <4h0lj7$umc@holly.ACNS.ColoState.EDU>
  8. References: <4grmfq$cs7@digital.netvoyage.net>
  9. NNTP-Posting-Host: holly.acns.colostate.edu
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Abu Wawda (abu@digital.netvoyage.net) wrote:
  13.  
  14. : I simply can't get my files to compile with g++, so please help. I have
  15. : this problem only with C++ programs using templates. I have three files:
  16. : list.h, list.C, and sample.C. list.h contains the declarations for my list
  17. : class (which uses templates). list.C includes list.h and implements the
  18. : class. sample.C includes list.h and is a sample that creates a list object
  19. : and does a few things with it. This is how I compile them:
  20.  
  21. :     g++ -c sample.C
  22. :     g++ -c list.C
  23. :     g++ sample.o list.o
  24.  
  25. Which verison of g++ are you using.  I think I remember hearing that only the
  26. newer version (2.7.+) support templates.  Don't quote me on that though.
  27. That's just what I heard.
  28.  
  29. // ------------ BEGIN SIGNATURE ---------------
  30. #include <iostream.h>
  31. void main()
  32. {
  33.   cout<<"\aName:\tCorby S. Hudnall\n";
  34.   cout<<"School:\tColorado State University\n";
  35.   cout<<"EMail\tcorbyh@holly.colostate.edu\n";
  36.   cout<<"URL\thttp://holly.colostate.edu/~corbyh/\n";
  37. }
  38. // ------------- END SIGNATURE ----------------
  39.  
  40.